package com.kancy.spring.sample.bean;

import com.kancy.spring.context.annotation.Autowired;
import com.kancy.spring.context.annotation.Component;
import com.kancy.spring.log.Logger;
import com.kancy.spring.log.LoggerFactory;

/**
 * BeanB
 *
 * @author kancy
 * @date 2020/2/18 12:12
 */
@Component
public class BeanB {
    private static final Logger log = LoggerFactory.getLogger(BeanB.class);

    private String content;

    @Autowired
    private BeanA beanA;

    public BeanB(){}

    public BeanB(String content) {
        this.content = content;
    }

    public void print() {
        log.info("[BeanB].beanA = %s", beanA.toString());
    }
}
